package com.ihr360.job.core.job;

import com.ihr360.job.core.Job;
import com.ihr360.job.core.JobParameters;
import com.ihr360.job.core.entity.StepExecution;

/**
 * Strategy interface for translating a {@link StepExecution} into
 * {@link JobParameters}.
 *
 * @author Dave Syer
 *
 */
public interface JobParametersExtractor {

    /**
     * Extract job parameters from the step execution, for example from the
     * execution context or other properties.
     *
     * @param job a {@link Job}
     * @param stepExecution a {@link StepExecution}
     *
     * @return some {@link JobParameters}
     */
    JobParameters getJobParameters(Job job, StepExecution stepExecution);

}
